Optimal. Leaf size=351 \[ \frac {e^{-\frac {a}{b n}} (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{2 b^3 e^3 n^3}+\frac {4 e^{-\frac {2 a}{b n}} g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^3 e^3 n^3}+\frac {9 e^{-\frac {3 a}{b n}} g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {Ei}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{2 b^3 e^3 n^3}-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.61, antiderivative size = 351, normalized size of antiderivative = 1.00, number of steps
used = 33, number of rules used = 7, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {2447, 2446,
2436, 2337, 2209, 2437, 2347} \begin {gather*} \frac {4 g e^{-\frac {2 a}{b n}} (d+e x)^2 (e f-d g) \left (c (d+e x)^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^3 e^3 n^3}+\frac {e^{-\frac {a}{b n}} (d+e x) (e f-d g)^2 \left (c (d+e x)^n\right )^{-1/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{2 b^3 e^3 n^3}+\frac {9 g^2 e^{-\frac {3 a}{b n}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {Ei}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{2 b^3 e^3 n^3}+\frac {(d+e x) (f+g x) (e f-d g)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2209
Rule 2337
Rule 2347
Rule 2436
Rule 2437
Rule 2446
Rule 2447
Rubi steps
\begin {align*} \int \frac {(f+g x)^2}{\left (a+b \log \left (c (d+e x)^n\right )\right )^3} \, dx &=-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {3 \int \frac {(f+g x)^2}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx}{2 b n}-\frac {(e f-d g) \int \frac {f+g x}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx}{b e n}\\ &=-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {9 \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx}{2 b^2 n^2}-\frac {(2 (e f-d g)) \int \frac {f+g x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e n^2}-\frac {(3 (e f-d g)) \int \frac {f+g x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e n^2}+\frac {(e f-d g)^2 \int \frac {1}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e^2 n^2}\\ &=-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {9 \int \left (\frac {(e f-d g)^2}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {2 g (e f-d g) (d+e x)}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {g^2 (d+e x)^2}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}\right ) \, dx}{2 b^2 n^2}-\frac {(2 (e f-d g)) \int \left (\frac {e f-d g}{e \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {g (d+e x)}{e \left (a+b \log \left (c (d+e x)^n\right )\right )}\right ) \, dx}{b^2 e n^2}-\frac {(3 (e f-d g)) \int \left (\frac {e f-d g}{e \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {g (d+e x)}{e \left (a+b \log \left (c (d+e x)^n\right )\right )}\right ) \, dx}{b^2 e n^2}+\frac {(e f-d g)^2 \text {Subst}\left (\int \frac {1}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b^2 e^3 n^2}\\ &=-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {\left (9 g^2\right ) \int \frac {(d+e x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx}{2 b^2 e^2 n^2}-\frac {(2 g (e f-d g)) \int \frac {d+e x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e^2 n^2}-\frac {(3 g (e f-d g)) \int \frac {d+e x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e^2 n^2}+\frac {(9 g (e f-d g)) \int \frac {d+e x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e^2 n^2}-\frac {\left (2 (e f-d g)^2\right ) \int \frac {1}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e^2 n^2}-\frac {\left (3 (e f-d g)^2\right ) \int \frac {1}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b^2 e^2 n^2}+\frac {\left (9 (e f-d g)^2\right ) \int \frac {1}{a+b \log \left (c (d+e x)^n\right )} \, dx}{2 b^2 e^2 n^2}+\frac {\left ((e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b^2 e^3 n^3}\\ &=\frac {e^{-\frac {a}{b n}} (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b^3 e^3 n^3}-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {\left (9 g^2\right ) \text {Subst}\left (\int \frac {x^2}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{2 b^2 e^3 n^2}-\frac {(2 g (e f-d g)) \text {Subst}\left (\int \frac {x}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b^2 e^3 n^2}-\frac {(3 g (e f-d g)) \text {Subst}\left (\int \frac {x}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b^2 e^3 n^2}+\frac {(9 g (e f-d g)) \text {Subst}\left (\int \frac {x}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b^2 e^3 n^2}-\frac {\left (2 (e f-d g)^2\right ) \text {Subst}\left (\int \frac {1}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b^2 e^3 n^2}-\frac {\left (3 (e f-d g)^2\right ) \text {Subst}\left (\int \frac {1}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b^2 e^3 n^2}+\frac {\left (9 (e f-d g)^2\right ) \text {Subst}\left (\int \frac {1}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{2 b^2 e^3 n^2}\\ &=\frac {e^{-\frac {a}{b n}} (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b^3 e^3 n^3}-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {\left (9 g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{2 b^2 e^3 n^3}-\frac {\left (2 g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b^2 e^3 n^3}-\frac {\left (3 g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b^2 e^3 n^3}+\frac {\left (9 g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b^2 e^3 n^3}-\frac {\left (2 (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b^2 e^3 n^3}-\frac {\left (3 (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b^2 e^3 n^3}+\frac {\left (9 (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{2 b^2 e^3 n^3}\\ &=\frac {e^{-\frac {a}{b n}} (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{2 b^3 e^3 n^3}+\frac {4 e^{-\frac {2 a}{b n}} g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^3 e^3 n^3}+\frac {9 e^{-\frac {3 a}{b n}} g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {Ei}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{2 b^3 e^3 n^3}-\frac {(d+e x) (f+g x)^2}{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right )^2}+\frac {(e f-d g) (d+e x) (f+g x)}{b^2 e^2 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}-\frac {3 (d+e x) (f+g x)^2}{2 b^2 e n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.95, size = 351, normalized size = 1.00 \begin {gather*} \frac {e^{-\frac {3 a}{b n}} (d+e x) \left (c (d+e x)^n\right )^{-3/n} \left (e^{\frac {2 a}{b n}} (e f-d g)^2 \left (c (d+e x)^n\right )^{2/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2-8 e^{\frac {a}{b n}} g (-e f+d g) (d+e x) \left (c (d+e x)^n\right )^{\frac {1}{n}} \text {Ei}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2+9 g^2 (d+e x)^2 \text {Ei}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2-b e e^{\frac {3 a}{b n}} n \left (c (d+e x)^n\right )^{3/n} (f+g x) \left (b e n (f+g x)+a (e f+2 d g+3 e g x)+b (2 d g+e (f+3 g x)) \log \left (c (d+e x)^n\right )\right )\right )}{2 b^3 e^3 n^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.03, size = 6545, normalized size = 18.65
method | result | size |
risch | \(\text {Expression too large to display}\) | \(6545\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1088 vs.
\(2 (357) = 714\).
time = 0.37, size = 1088, normalized size = 3.10 \begin {gather*} -\frac {{\left (8 \, {\left (a^{2} d g^{2} - a^{2} f g e + {\left (b^{2} d g^{2} n^{2} - b^{2} f g n^{2} e\right )} \log \left (x e + d\right )^{2} + {\left (b^{2} d g^{2} - b^{2} f g e\right )} \log \left (c\right )^{2} + 2 \, {\left (a b d g^{2} n - a b f g n e + {\left (b^{2} d g^{2} n - b^{2} f g n e\right )} \log \left (c\right )\right )} \log \left (x e + d\right ) + 2 \, {\left (a b d g^{2} - a b f g e\right )} \log \left (c\right )\right )} e^{\left (\frac {b \log \left (c\right ) + a}{b n}\right )} \operatorname {log\_integral}\left ({\left (x^{2} e^{2} + 2 \, d x e + d^{2}\right )} e^{\left (\frac {2 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right ) - {\left (a^{2} d^{2} g^{2} - 2 \, a^{2} d f g e + a^{2} f^{2} e^{2} + {\left (b^{2} d^{2} g^{2} n^{2} - 2 \, b^{2} d f g n^{2} e + b^{2} f^{2} n^{2} e^{2}\right )} \log \left (x e + d\right )^{2} + {\left (b^{2} d^{2} g^{2} - 2 \, b^{2} d f g e + b^{2} f^{2} e^{2}\right )} \log \left (c\right )^{2} + 2 \, {\left (a b d^{2} g^{2} n - 2 \, a b d f g n e + a b f^{2} n e^{2} + {\left (b^{2} d^{2} g^{2} n - 2 \, b^{2} d f g n e + b^{2} f^{2} n e^{2}\right )} \log \left (c\right )\right )} \log \left (x e + d\right ) + 2 \, {\left (a b d^{2} g^{2} - 2 \, a b d f g e + a b f^{2} e^{2}\right )} \log \left (c\right )\right )} e^{\left (\frac {2 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} \operatorname {log\_integral}\left ({\left (x e + d\right )} e^{\left (\frac {b \log \left (c\right ) + a}{b n}\right )}\right ) + {\left ({\left ({\left (b^{2} g^{2} n^{2} + 3 \, a b g^{2} n\right )} x^{3} + 2 \, {\left (b^{2} f g n^{2} + 2 \, a b f g n\right )} x^{2} + {\left (b^{2} f^{2} n^{2} + a b f^{2} n\right )} x\right )} e^{3} + {\left (b^{2} d f^{2} n^{2} + a b d f^{2} n + {\left (b^{2} d g^{2} n^{2} + 5 \, a b d g^{2} n\right )} x^{2} + 2 \, {\left (b^{2} d f g n^{2} + 3 \, a b d f g n\right )} x\right )} e^{2} + 2 \, {\left (a b d^{2} g^{2} n x + a b d^{2} f g n\right )} e + {\left ({\left (3 \, b^{2} g^{2} n^{2} x^{3} + 4 \, b^{2} f g n^{2} x^{2} + b^{2} f^{2} n^{2} x\right )} e^{3} + {\left (5 \, b^{2} d g^{2} n^{2} x^{2} + 6 \, b^{2} d f g n^{2} x + b^{2} d f^{2} n^{2}\right )} e^{2} + 2 \, {\left (b^{2} d^{2} g^{2} n^{2} x + b^{2} d^{2} f g n^{2}\right )} e\right )} \log \left (x e + d\right ) + {\left ({\left (3 \, b^{2} g^{2} n x^{3} + 4 \, b^{2} f g n x^{2} + b^{2} f^{2} n x\right )} e^{3} + {\left (5 \, b^{2} d g^{2} n x^{2} + 6 \, b^{2} d f g n x + b^{2} d f^{2} n\right )} e^{2} + 2 \, {\left (b^{2} d^{2} g^{2} n x + b^{2} d^{2} f g n\right )} e\right )} \log \left (c\right )\right )} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} - 9 \, {\left (b^{2} g^{2} n^{2} \log \left (x e + d\right )^{2} + b^{2} g^{2} \log \left (c\right )^{2} + 2 \, a b g^{2} \log \left (c\right ) + a^{2} g^{2} + 2 \, {\left (b^{2} g^{2} n \log \left (c\right ) + a b g^{2} n\right )} \log \left (x e + d\right )\right )} \operatorname {log\_integral}\left ({\left (x^{3} e^{3} + 3 \, d x^{2} e^{2} + 3 \, d^{2} x e + d^{3}\right )} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right )\right )} e^{\left (-\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}}{2 \, {\left (b^{5} n^{5} e^{3} \log \left (x e + d\right )^{2} + b^{5} n^{3} e^{3} \log \left (c\right )^{2} + 2 \, a b^{4} n^{3} e^{3} \log \left (c\right ) + a^{2} b^{3} n^{3} e^{3} + 2 \, {\left (b^{5} n^{4} e^{3} \log \left (c\right ) + a b^{4} n^{4} e^{3}\right )} \log \left (x e + d\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (f + g x\right )^{2}}{\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 8396 vs.
\(2 (357) = 714\).
time = 5.70, size = 8396, normalized size = 23.92 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (f+g\,x\right )}^2}{{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________